package com.yu.blog.cofig.security.mapper;


import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
import org.springframework.stereotype.Repository;
import java.util.HashMap;

@Repository
@Mapper
public interface AuthMapper {

    @Select("""
    select admin_name,admin_password,role_code from p_admin admin
    join p_admin_role par on admin.id = par.admin_id
    join p_role role on par.role_id = role.id
    where admin_name=#{username}""")
    HashMap<String,String> getAdminInfo(@Param("username") String username);

}
